<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>01节点操作</title>
    <script>
        window.onload = function(){
            var demo = document.getElementById("demo");
            var btn = document.getElementsByTagName("button")[0];
            btn.onclick = function(){
                //创建标签
                var newLi = document.createElement("li");
                newLi.innerHTML = "测试创建节点"
                demo.appendChild(newLi);
                demo.parentNode.appendChild(demo.cloneNode(true));
            }
        }
    </script>
</head>
<body>
<button>点击</button>
<ul id="demo">

</ul>
</body>
</html>